package com.naiterui.ehp.bs.pharmacist.controller.inner;

import com.naiterui.ehp.bp.constants.SwaggerTag;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.pharmacist.service.IPharmacistService;
import com.naiterui.ehp.bs.pharmacist.vo.user.SignUserParamVO;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 用户信息接口
 * @Author gongbaoqiang
 * @Date 2019/12/3 12:32 PM
 */
@Slf4j
@RestController
@RequestMapping("pharmacist/inner/user")
@AllArgsConstructor
@Api(tags = {SwaggerTag.PHARMACIST + SwaggerTag.INNER_API + SwaggerTag.USER_INFO})
public class PharmacistInnerUserController {

    private final IPharmacistService pharmacistService;

    @GetMapping("/getUserByPhone")
    public SignUserParamVO getUserByPhone(String phone) throws BusinessException {
        return pharmacistService.getUserByPhone(phone);
    }
}
